package com.bawei.park2211a.mine

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.recyclerview.widget.LinearLayoutManager
import com.alibaba.android.arouter.facade.annotation.Route
import com.bawei.base.mvvm.BaseActivity
import com.bawei.park2211a.R
import com.bawei.park2211a.adapter.AuditTypeAdapter
import com.bawei.park2211a.adapter.VisitTypeAdapter
import com.bawei.park2211a.databinding.ActivityMineAuditBinding
import dagger.hilt.android.AndroidEntryPoint
import java.text.SimpleDateFormat

@Route(path = "/app/mine/MineAuditActivity")
@AndroidEntryPoint
class MineAuditActivity : BaseActivity<ActivityMineAuditBinding, MineAuditViewModel>() {
    lateinit var auditTypeAdapter: AuditTypeAdapter
    var index = 0
    override fun initView() {
        auditTypeAdapter = AuditTypeAdapter()
        viewModel.car(1)
        auditTypeAdapter.data.add("全部")
        auditTypeAdapter.data.add("车位审核")
        auditTypeAdapter.data.add("来访审核")
        auditTypeAdapter.data.add("新闻审核")
        binding.recType.adapter = auditTypeAdapter
        binding.recType.layoutManager =
            LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)
        auditTypeAdapter.setOnItemClickListener { _, _, position ->
            index = auditTypeAdapter.setTypeId(auditTypeAdapter.data[position], index, position)
        }
    }

    override fun initData() {
        viewModel.carSuccess.observe(this) {
           
        }
    }
}